import 'package:flutter/material.dart';

class MyListView extends StatelessWidget {
  MyListView({super.key});

  final List nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];

  @override
  Widget build(BuildContext context) {
    return ListView(
      physics: const BouncingScrollPhysics(),
      scrollDirection: Axis.vertical,
      children: nums
          .map((e) => Container(
                height: 100,
                color: Colors.primaries[e % Colors.primaries.length],
                child: Center(
                  child: Text(
                    e.toString(),
                    style: const TextStyle(fontSize: 20),
                  ),
                ),
              ))
          .toList(),
    );
  }
}
